package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TVehicleModelMapper;
import com.ruoyi.system.domain.TVehicleModel;
import com.ruoyi.system.service.ITVehicleModelService;
import com.ruoyi.common.core.text.Convert;

/**
 * 车型Service业务层处理
 * 
 * @author wuliuzhen
 * @date 2025-10-01
 */
@Service
public class TVehicleModelServiceImpl implements ITVehicleModelService 
{
    @Autowired
    private TVehicleModelMapper tVehicleModelMapper;

    /**
     * 查询车型
     * 
     * @param id 车型主键
     * @return 车型
     */
    @Override
    public TVehicleModel selectTVehicleModelById(Long id)
    {
        return tVehicleModelMapper.selectTVehicleModelById(id);
    }

    /**
     * 查询车型列表
     * 
     * @param tVehicleModel 车型
     * @return 车型
     */
    @Override
    public List<TVehicleModel> selectTVehicleModelList(TVehicleModel tVehicleModel)
    {
        return tVehicleModelMapper.selectTVehicleModelList(tVehicleModel);
    }

    /**
     * 新增车型
     * 
     * @param tVehicleModel 车型
     * @return 结果
     */
    @Override
    public int insertTVehicleModel(TVehicleModel tVehicleModel)
    {
        return tVehicleModelMapper.insertTVehicleModel(tVehicleModel);
    }

    /**
     * 修改车型
     * 
     * @param tVehicleModel 车型
     * @return 结果
     */
    @Override
    public int updateTVehicleModel(TVehicleModel tVehicleModel)
    {
        return tVehicleModelMapper.updateTVehicleModel(tVehicleModel);
    }

    /**
     * 批量删除车型
     * 
     * @param ids 需要删除的车型主键
     * @return 结果
     */
    @Override
    public int deleteTVehicleModelByIds(String ids)
    {
        return tVehicleModelMapper.deleteTVehicleModelByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除车型信息
     * 
     * @param id 车型主键
     * @return 结果
     */
    @Override
    public int deleteTVehicleModelById(Long id)
    {
        return tVehicleModelMapper.deleteTVehicleModelById(id);
    }
}
